![]() |
PtInIconRef |
||||
Header: | Icons.h | Carbon status: | Supported | |
Tests whether a specified point falls within an icon’s mask.
Boolean PtInIconRef ( const Point *testPt, const Rect *iconRect, IconAlignmentType align, IconServicesUsageFlags theIconServicesUsageFlags, IconRef theIconRef );
A pointer to the location, specified in local coordinates of the current graphics port, that Icon Services tests to see whether it falls within the mask of the indicated icon.
A pointer to the rectangle defining the area that Icon Services uses to determine which icon is hit-tested. Use the same Rect value as when the icon was last drawn.
A value that specifies how the indicated icon is aligned within the rectangle specified in the iconRect parameter. Use the same IconAlignmentType value as when the icon was last drawn. for a description of possible return values, see
Reserved for future use. Pass the kIconServicesDefaultUsageFlags constant in this parameter.
The icon to be tested.
true if the point specified in the testPt parameter falls within the appropriate icon mask, false otherwise.
This function is similar to the Icon Utilities function PtInIconSuite. The function is useful when you want to determine whether a user has clicked on a particular icon, for example.
Icon Services uses the icon’s black-and-white mask for hit-testing, even if you provide a deep mask.
Supported in Carbon. Available in CarbonLib 1.0 and later when IconServicesLib 8.5 or later is installed. Exported by CarbonLib 1.0 and later and by IconServicesLib 8.5 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/18/2000)